package com.irdstudio.apicenter.console.controller.make;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping(value = "/make")
public class MakeFrameAction {

	private static final long serialVersionUID = 4989311084866378322L;

	/**
	 * 应用制作-开发管理首页
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "devIndex")
	public ModelAndView devIndex(HttpServletRequest request) throws Exception {
		String appid = request.getParameter("appid");
		String appName = java.net.URLDecoder.decode(request
				.getParameter("appName"), "UTF-8");
		// String appName=request.getParameter("appName");
		ModelAndView modelAndView = new ModelAndView();
		modelAndView.addObject("appid", appid);
		modelAndView.addObject("appName", appName);
		modelAndView.setViewName("make/devIndex");
		return modelAndView;
	}

	/**
	 * 应用制作-功能参数设置首页
	 * @param request
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "configIndex")
	public ModelAndView fncIndex(HttpServletRequest request) throws Exception {
		String appid = request.getParameter("appid");
		String appName = java.net.URLDecoder.decode(request
				.getParameter("appName"), "UTF-8");
		// String appName=request.getParameter("appName");
		ModelAndView modelAndView = new ModelAndView();
		modelAndView.addObject("appid", appid);
		modelAndView.addObject("appName", appName);
		modelAndView.setViewName("make/configIndex");
		return modelAndView;
	}		

	@RequestMapping(value = "qrcode")
	public String showQrcode() {
		return "qrcode";
	}

}